package com.yihu.cms.service;

import java.io.IOException;
import java.net.MalformedURLException;
import java.util.ArrayList;
import java.util.List;

import com.yihu.beans.ArtworkAuthor;
import com.yihu.beans.ArtworkType;
import com.yihu.dataService.hessian.mongodb.interfaceService.ArtworkAuthorHService;
import com.yihu.dataService.hessian.mongodb.interfaceService.ArtworkTypeHService;
import com.yihu.dataService.hessian.resource.ResourceMongoDBManager;

public class ArtworkTypeService implements ArtworkTypeHService {

	@Override
	public List<ArtworkType> getAllArtworkType() {
		List<ArtworkType> result = new ArrayList<ArtworkType>();
		try {
			ArtworkTypeHService ah = (ArtworkTypeHService) ResourceMongoDBManager
					.getSingleton().getBeans("artworkTypeHSC");

			result = ah.getAllArtworkType();
		} catch (MalformedURLException e) {
			System.out.println(e.toString());
		} catch (IOException e1) {
			e1.printStackTrace();
		}
		
		return result;
	}

}
